package com.hera.process.workflow.domain;

import java.io.Serializable;

import javax.persistence.*;

/**
 * The primary key class for the PROCESS_GROUP_USER database table.
 * 
 */
@Embeddable
public class ProcessGroupUserPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="ID_PROCESS_GROUP")
	private Long idProcessGroup;

	@Column(name="USER_LOGIN")
	private String userLogin;
	

	public ProcessGroupUserPK() {
	}
	
	
	
	public ProcessGroupUserPK(Long idProcessGroup, String userLogin) {
		super();
		this.idProcessGroup = idProcessGroup;
		this.userLogin = userLogin;
	}



	public Long getIdProcessGroup() {
		return this.idProcessGroup;
	}
	public void setIdProcessGroup(Long idProcessGroup) {
		this.idProcessGroup = idProcessGroup;
	}
	public String getUserLogin() {
		return this.userLogin;
	}
	public void setUserLogin(String userLogin) {
		this.userLogin = userLogin;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof ProcessGroupUserPK)) {
			return false;
		}
		ProcessGroupUserPK castOther = (ProcessGroupUserPK)other;
		return 
			(this.idProcessGroup == castOther.idProcessGroup)
			&& this.userLogin.equals(castOther.userLogin);
	}

	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + ((int) (this.idProcessGroup.longValue() ^ (this.idProcessGroup.longValue() >>> 32)));
		hash = hash * prime + this.userLogin.hashCode();
		
		return hash;
	}
}